//package com.shop.shoporder.OrderTimingTask;
//
//import com.shop.shoporder.common.UserRequest;
//import com.shop.shoporder.service.OrderSettlementService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//@Component
//public class OrderSettlementAuto {
//
//    @Autowired
//    OrderSettlementService orderSettlementService;
//
//    @Scheduled(fixedRate = 60000)
//    public void AutoReceivingGoods() {
//
//        String Ip = UserRequest.getServerIp();
////        if (Ip.contains("172.18.109.46"))
//        if(1==1)
//        {
//            System.out.println("开始结算订单");
//            //结算订单
//            if (orderSettlementService.selectSettlement()) {
//                System.out.println("结算订单成功");
//            } else {
//                System.out.println("结算订单失败");
//            }
//        } else {
//            System.out.println("本地运行，不结算");
//        }
//    }
//
//    @Scheduled(fixedRate = 5000)
//    public void AutoKeepRedisUser() {
//
////        System.out.println("保持缓存");
//        //结算订单
//        if (orderSettlementService.keepRedisUser()) {
////            System.out.println("保持成功");
//        } else {
////            System.out.println("保持失败");
//        }
//    }
//}